<style>
    .ui.comments .comment .author {
        font-size: 1em;
        color: rgba(0,0,0,.87);
        font-weight: 700;
        margin-left: -600px;
    }
    .ui.comments .comment .text {
        margin: .25em 0 .5em;
        font-size: 1em;
        word-wrap: break-word;
        color: rgba(0, 0, 0, .87);
        line-height: 1.3;
        /* margin-left: -527px; */
        float: revert;
        margin-right: 615px;
    }
</style>
<div class="ui threaded comments" style="max-width: 100%;">
    <h3 class="ui dividing header">评论</h3>
    <#list comments as comment>
        <div class="comment" >
            <div class="content" >
                <a class="avatar">
                    <img src="/img/用户.png" width="100px" height="100px" >
                </a>
                <a class="author" >
                    <span >${comment.username}</span>
                    <div class="ui mini basic teal left pointing label m-padded-mini" >靓仔</div>
                </a>
                <div class="metadata">
                    <span class="date" >${comment.createTime?string("yyyy-MM-dd HH:mm:ss")}</span>
                </div>
                <div class="text" >
                    ${comment.content}
                </div>
                <div class="actions">
                    <#if Session.user??>
                        <a class="reply" data-commentid="${comment.commentId}" data-commentnickname="${comment.username}"  onclick="reply(this)">回复</a>
                        <#if comment.username==Session.user.username>
                            <a class="delete" onclick="removeComment(${comment.commentId})">删除</a>
                        </#if>
                    </#if>
                </div>
            </div>
            <#if (comment.replyComments?size>0)>
                <#list comment.replyComments as reply>
                    <div class="comments" >
                        <div class="comment" >
                            <div class="content">
                                <a class="avatar">
                                    <img src="/img/用户.png" width="100px" height="100px" >
                                </a>
                                <a class="author" >
                                    <span >${reply.username}</span>
                                    <div class="ui mini basic teal left pointing label m-padded-mini" >靓仔</div>
                                    &nbsp;<span class="m-teal">@${reply.parentname}</span>
                                </a>
                                <div class="metadata">
                                    <span class="date" >${reply.createTime?string("yyyy-MM-dd HH:mm:ss")}</span>
                                </div>
                                <div class="text">
                                    ${reply.content}
                                </div>
                                <div class="actions">
                                    <#if Session.user??>
                                        <a class="reply" data-commentid="${reply.commentId}" data-commentnickname="${reply.username}" onclick="reply(this)">回复</a>
                                        <#if reply.username==Session.user.username>
                                            <a class="delete" onclick="removeComment((${reply.commentId}))">删除</a>
                                        </#if>
                                    </#if>
                                </div>
                            </div>
                        </div>
                    </div>
                </#list>
            </#if>
        </div>
    </#list>

</div>